package tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import packageServer.Carogna;

public class TestCarogna {

	private Carogna carogna;
	
	@Before
	public void setUp() throws Exception {
		carogna=new Carogna();
	}

	@After
	public void tearDown() throws Exception {
		carogna=null;
	}

	@Test
	public void testCarogna() {
		assertTrue(carogna.getEnergia()>=350);
		assertTrue(carogna.getEnergia()<=650);
		assertTrue(carogna.getEnergia()==carogna.getEnergia_max());
		}

	@Test
	public void testDecrementaEnergia() {
		carogna.setEnergia(500);
		carogna.setEnergia_max(500);
		assertTrue(carogna.decrementaEnergia());
		assertEquals(450,carogna.getEnergia());
	}

}
